<template>
	<view class="pages">
	</view>
</template>

<script>
export default {
	data() {
		return {
			timer: null
		};
	},
	onShow() {
		this.timeToLink();
	},
	methods: {
		timeToLink() {
			let that = this;
			uni.showLoading({
				mask: true,
			})
			that.timer = setTimeout(function() {
				clearTimeout(that.timer);
				// //#ifdef H5 
				// setTimeout(() => {
				// 	that.$tools.switchTab('/pages/index/index');
				// }, 8000);
				// //#endif
				// console.log("APP-PLUS");
				let isLogin = uni.getStorageSync('token') != '';
				if (isLogin) {
					setTimeout(() => {
						that.$tools.jump('/pages/index/manage');
					}, 1500);
				} else {
					setTimeout(() => {
						that.$tools.redirectTo('/pages/operate/login');
					}, 1500);
				}
				uni.hideLoading();
			}, 100);
		}
	}
};
</script>

<style lang="scss" scoped>
	.pages{
		width: 100vw;
		height: 100vh;
	}
</style>
